<template>
    <BaseContainer>
      <aplid-base-crud ref="crud" class="w-100" :paramsObj="paramsObj"  v-bind="{...baseConfig,...$attrs }" >
        <template v-slot:ArchivesDialog="{ row, show }">
          <Archives @refresh="handleRefresh" @refreshPage="handleRefreshPage" @rechange="handleOperate"
            :api="baseConfig.api" :key="show" :nowRowData="row"></Archives>
        </template>
      </aplid-base-crud>
    </BaseContainer>
  </template>
  
  <script setup lang="ts">
  import { ref } from 'vue'
  import {baseConfig} from './serviceObjConfig'
  import Archives from '@/views/datacenter/basicData/oldman/components/Archives/index.vue'
  import {getStore} from '@/utils/store'
  
  // 判断是否是服务商，是的话不需要数据权限
let paramsObj = ref({})
let userInfo = getStore('userInfo')||{}
paramsObj.value = {
	isWithAuth:userInfo.classifyId==5?0:1,
  seniorLiving:2
}
  const crud = ref()
  const dialogVisible = ref(false)
  const handleRefresh = (query, visible = false) => {
    dialogVisible.value = visible
    nextTick(() => {
      crud.value.refreshChange(query)
    })
  }
  const handleOperate = (type, row, title) => {
    nextTick(() => {
      crud.value.handleOperate(type, row, title)
    })
  }
  const handleRefreshPage = () => {
    nextTick(() => {
      crud.value.refreshChange({}, true)
    })
  }
  
  
  </script>
  
  <style scoped></style>
  